Intra prediction method and apparatus for performing adaptive filtering on reference pixel

ABSTRACT

Disclosed is an intra-prediction method for adaptively filtering a reference pixel. The intra-prediction method includes configuring reference pixels belonging to a neighboring block adjacent to a current block, adaptively filtering the configured reference pixels, and generating a prediction block for the current block by performing intra-prediction using the filtered reference pixels. Accordingly, it is possible to increase the accuracy of the prediction block.

TECHNICAL FIELD

The present invention relates to an intra-prediction method andapparatus for performing adaptive filtering on a reference pixel, andmore particularly, to a technology for improving intra-predictionefficiency by adaptively filtering a reference pixel belonging to ablock neighboring to a current block with consideration ofcharacteristics of the neighboring block.

BACKGROUND ART

ISO/ISE Moving Picture Experts Group (MPEG) and ITU-T Video CodingExperts Group (VCEG) organized Joint Collaborative Team on Video Coding(JCV-VC) and established MPEG-H High Efficiency Video Coding(HEVC)/ITU-T H.265, which is a video compression standard technology, inJanuary 2013. Also, in order to respond to the trend of popularizinghigh-quality images due to the recent rapid development of informationcommunication technology, ISO/ISE MPEG and ITU-T VCEG organized theJoint Video Exploration Team (JVET) at the 22nd JCT-VC Geneva Conferenceand is actively striving to establish the next generation imagecompression technology standard for Ultra High Definition (UHD) images,which have a higher image resolution than High Definition (HD) images.

Meanwhile, according to a conventional video compression standardtechnology, a prediction block for a current block to be encoded isgenerated, and a difference between the prediction block and the currentblock is encoded, thereby reducing the amount of data to be encoded.Such a prediction technique includes an intra-prediction method forgenerating a prediction block for a current block using similarity witha spatially adjacent block in the same screen and an inter-predictionmethod for generating a prediction block for a current block usingsimilarity with a block in a temporarily adjacent screen.

In the case of the intra-prediction method, the prediction block isgenerated using a reference pixel included in a neighboring block, andthe reference pixel is a pixel reconfigured through quantization andthus contains a quantization error. Therefore, the filtering of thereference pixel is required. However, the conventional technique filtersthe reference pixel without considering the characteristics of theneighboring block, so that the accuracy of prediction using the filteredreference pixel may be degraded.

DISCLOSURE Technical Problem

The present invention is directed to providing an intra-predictionmethod for adaptively filtering a reference pixel.

The present invention is also directed to providing an image decodingapparatus for performing intra-prediction.

Technical Solution

According to an aspect of the present invention, there is provided anintra-prediction method for adaptively filtering a reference pixel.

The intra-prediction method may comprise configuring reference pixelsbelonging to a neighboring block adjacent to a current block; adaptivelyfiltering the configured reference pixels; and generating a predictionblock for the current block by performing intra-prediction using thefiltered reference pixels.

The adaptive filtering may comprise performing adaptive filteringaccording to a relative size of the neighboring block with respect tothe size of the current block.

The adaptive filtering may comprise applying a filter weaker than areference filter to filter the reference pixels when the neighboringblock is smaller than the current block.

The adaptive filtering may comprise applying a filter stronger than areference filter to filter the reference pixels when the neighboringblock is larger than the current block.

The adaptive filtering may comprise applying a predetermined referencefilter to filter the reference pixels when the neighboring block isequal in size to the current block.

The adaptive filtering may comprise performing the adaptively filteringaccording to the relative size of the neighboring block when the currentblock is smaller than a predetermined size.

The adaptive filtering may comprise applying a filter stronger than areference filter to filter the reference pixels without needing toconsider the relative size of the neighboring block when the currentblock is larger than or equal in size to a predetermined size.

The predetermined size may be one of 64×64, 32×32, 16×16, and 8×8.

The adaptive filtering may be performed only when the minimum distancebetween an intra-prediction mode of the current block and a verticalmode or a horizontal mode is greater than or equal to a predeterminedthreshold value.

The adaptive filtering may comprise changing coefficients or the numberof taps of a reference filter and then filtering the reference pixelswhen the neighboring block is smaller than the current block and theconfigured reference pixels are located on a boundary between twoneighboring blocks.

The adaptive filtering may comprise determining whether an edge ispresent between the reference pixels belonging to the neighboring blockwhen the neighboring block is larger than or equal in size to thecurrent block.

The determining of whether an edge is present may comprise determiningwhether the edge is present depending on whether a first value obtainedby using three consecutive pixels or two consecutive pixels among thereference pixels is greater than a threshold value.

The adaptive filtering may comprise filtering only reference pixelsbelonging to a neighboring block with no edge.

According to another aspect of the present invention, there is providedan image decoding apparatus for performing intra-prediction.

The image decoding apparatus may comprise at least one processor; and amemory configured to store instructions for instructing the at least oneprocessor to perform at least one step.

The at least one step may comprise configuring reference pixelsbelonging to a neighboring block adjacent to a current block; adaptivelyfiltering the configured reference pixels; and generating a predictionblock for the current block by performing intra-prediction using thefiltered reference pixels.

The adaptive filtering may comprise performing adaptive filteringaccording to a relative size of the neighboring block with respect tothe size of the current block.

The adaptive filtering may comprise applying a filter weaker than areference filter to filter the reference pixels when the neighboringblock is smaller than the current block.

The adaptive filtering may comprise applying a filter stronger than areference filter to filter the reference pixels when the neighboringblock is larger than the current block.

The adaptive filtering may comprise applying a predetermined referencefilter to filer the reference pixels when the neighboring block is equalin size to the current block.

The adaptive filtering may comprise performing the adaptively filteringaccording to a relative size of the neighboring block when the currentblock is smaller than a predetermined size.

The adaptive filtering may comprise applying a filter stronger than areference filter to filter the reference pixels without needing toconsider the relative size of the neighboring block when the currentblock is larger than or equal in size to a predetermined size.

The predetermined size may be one of 64×64, 32×32, 16×16, and 8×8.

The adaptive filtering may be performed only when the minimum distancebetween an intra-prediction mode of the current block and a verticalmode or a horizontal mode is greater than or equal to a predeterminedthreshold value.

Advantageous Effects

With the intra-prediction method and apparatus for adaptively filteringa reference pixel according to the present invention, thecharacteristics of a neighboring block are reflected when the referencepixel is filtered. Thus, it is possible to enhance the accuracy of aprediction block generated using the filtered reference pixel.

Also, the edge characteristic and the block boundary characteristics ofthe neighboring block may all be considered, and thus it is possible toimprove image encoding and decoding efficiency.

DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual view of an image encoding and decoding systemaccording to an embodiment of the present invention.

FIG. 2 is a block diagram of an image encoding apparatus according to anembodiment of the present invention.

FIG. 3 is a block diagram of an image decoding apparatus according to anembodiment of the present invention.

FIG. 4 is an example diagram illustrating an intra-prediction mode inHigh Efficiency Video Coding (HEVC).

FIG. 5 is an example diagram illustrating an intra-prediction methodaccording to a vertical mode.

FIG. 6 is an example diagram illustrating a method of adaptivelyfiltering a reference pixel on the basis of a correlation between acurrent block and a neighboring block in intra-prediction according toan embodiment of the present invention.

FIG. 7 is an example diagram illustrating an adaptive filtering methoddepending on the location of the reference pixel in intra-predictionaccording to an embodiment of the present invention.

FIG. 8 is a flowchart showing an intra-prediction method for adaptivelyfiltering a reference pixel according to an embodiment of the presentinvention.

FIG. 9 is a block diagram showing an image decoding apparatus forperforming intra-prediction according to an embodiment of the presentinvention.

MODES OF THE INVENTION

Example embodiments of the present invention are disclosed herein.However, specific structural and functional details disclosed herein aremerely representative for purposes of describing example embodiments ofthe present invention, and example embodiments of the present inventionmay be embodied in many alternative forms and should not be construed aslimited to example embodiments of the present invention set forthherein.

Accordingly, while the invention is susceptible to various modificationsand alternative forms, specific embodiments thereof are shown by way ofexample in the drawings and will herein be described in detail. Itshould be understood, however, that there is no intent to limit theinvention to the particular forms disclosed, but on the contrary, theinvention is to cover all modifications, equivalents, and alternativesfalling within the spirit and scope of the invention. Like numbers referto like elements throughout the description of the figures.

It will be understood that, although the terms first, second, etc. maybe used herein to describe various elements, these elements should notbe limited by these terms. These terms are only used to distinguish oneelement from another. For example, a first element could be termed asecond element, and, similarly, a second element could be termed a firstelement, without departing from the scope of the present invention. Asused herein, the term “and/or” includes any and all combinations of oneor more of the associated listed items.

It will be understood that when an element is referred to as being“connected” or “coupled” to another element, it can be directlyconnected or coupled to the other element or intervening elements may bepresent. In contrast, when an element is referred to as being “directlyconnected” or “directly coupled” to another element, there are nointervening elements present. Other words used to describe therelationship between elements should be interpreted in a like fashion(i.e., “between” versus “directly between”, “adjacent” versus “directlyadjacent”, etc.).

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”,“comprising,”, “includes” and/or “including”, when used herein, specifythe presence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

Unless otherwise defined, all terms (including technical and scientificterms) used herein have the same meaning as commonly understood by oneof ordinary skill in the art to which this invention belongs. It will befurther understood that terms, such as those defined in commonly useddictionaries, should be interpreted as having a meaning that isconsistent with their meaning in the context of the relevant art andwill not be interpreted in an idealized or overly formal sense unlessexpressly so defined herein.

It should also be noted that in some alternative implementations, thefunctions/acts noted in the blocks may occur out of the order noted inthe flowcharts. For example, two blocks shown in succession may in factbe executed substantially concurrently or the blocks may sometimes beexecuted in the reverse order, depending upon the functionality/actsinvolved.

Generally, an image may be composed of a series of still images. Thestill images may be classified in units of a group of pictures (GOP),and each still image may be referred to as a picture. In this case, thepicture may indicate one of frames and fields in a progressive signaland an interlaced signal. The picture may be represented as “frame” whenencoding/decoding is performed in units of frames and may be representedas “field” when encoding/decoding is performed in units of fields. Thepresent invention assumes a progressive signal, but may also be appliedto an interlaced signal. As a higher concept, units such as a GOP and asequence may exist, and also each picture may be segmented intopredetermined regions such as slices, tiles, blocks, and the like. Also,one GOP may include units such as Picture I, Picture P, and Picture B.Picture I may refer to a picture that is autonomously encoded/decodedwithout using a reference picture, and Picture P and Picture B may referto a picture that is encoded/decoded by performing a process such asmotion estimation and motion compensation using a reference picture.Generally, Picture P may use Picture I and Picture B as referencepictures, and Picture B may use Picture I and Picture P as referencepictures. However, the above definitions may also be changed by settingsof encoding/decoding.

Here, a picture referred to in encoding/decoding is called a referencepicture, and a block or pixel referred to in encoding/decoding is calleda reference block or a reference pixel. Also, reference data may includefrequency-domain coefficients and various types of encoding/decodinginformation generated and determined during an encoding/decodingprocess, as well as spatial-domain pixel values. For example, thereference data may correspond to intra-prediction-related information ormotion-related information in a prediction unit, transformation-relatedinformation in a transformation unit/an inverse transformation unit,quantization-related information in a quantization unit/an inversequantization unit, encoding/decoding-related information (contextinformation) in an encoding unit/a decoding unit, filter-relatedinformation in an in-loop filter unit, and the like.

The minimum unit of the image may be a pixel, and the number of bitsused to represent one pixel is called a bit depth. Generally, the bitdepth may be eight bits, and a bit depth of more than eight bits may besupported depending on encoding settings. At least one bit depth may besupported depending on a color space. Also, at least one color space maybe included according to an image color format. One or more pictureshaving a predetermined size or one or more pictures having differentsizes may be included according to a color format. For example, YCbCr4:2:0 may be composed of one luminance component (Y in this example) andtwo chrominance components (Cb/Cr in this example). At this time, thecomposition ratio of the chrominance components and the luminancecomponent may be 1:2 in width and height. As another example, YCbCr4:4:4 may have the same composition ratio in width and height. Like theabove example, when one or more color spaces are included, a picture maybe segmented into the color spaces.

The present invention will be described on the basis of any color space(Y in this example) of any color format (YCbCr in this example), andthis description will be applied to another color space (Cb and Cr inthis example) of the color format in the same or a similar manner(settings dependent on a specific color space). However, a partialdifference (settings independent of a specific color space) may be givento each color space. That is, the settings dependent on each color spacemay refer to settings proportional to or dependent on the compositionratio of each component (e.g., which is determined depending on 4:2:0,4:2:2, or 4:4:4), and the settings independent of each color space mayrefer to settings of only a corresponding color space, independentlyfrom or regardless of the composition ratio of each component. In thepresent invention, some elements may have independent settings ordependent settings depending on the encoder/decoder.

Setting information or syntax elements needed during an image encodingprocess may be determined at a level of units such as a video, asequence, a picture, a slice, a tile, a block, and the like. An encodermay add the setting information or syntax elements to a bitstream inunits of a video parameter set (VPS), a sequence parameter set (SPS), apicture parameter set (PPS), a slice header, a tile header, a blockheader, or the like and transmit the bitstream to a decoder. The decodermay parse the bitstream at the same level, restore the settinginformation transmitted from the encoder, and use the settinginformation in an image decoding process. Also, related information maybe transmitted through a bitstream in the form of supplement enhancementinformation (SEI) or metadata and then may be parsed and used. Eachparameter set has a unique ID value, and a lower parameter set may havean ID value of an upper parameter set to be referred to. For example, alower parameter set may refer to information of an upper parameter sethaving a matching ID value among one or more upper parameter sets. Amongvarious examples of the above-described units, when any one unitincludes one or more different units, the any one unit may be referredto as an upper unit, and the included units may be referred to as lowerunits.

Setting information having occurred in such a unit may include settingsindependent for each unit or settings dependent on a previous,following, or upper unit. Here, the dependent settings may be understoodas indicating setting information of a corresponding unit using flaginformation corresponding to settings of the previous, following, orupper unit (e.g., 1-bit flag; 1 indicates Follow, and 0 indicates Do NotFollow). In the present invention, the setting information will bedescribed focusing on an example of the independent settings. However,an example may also be included in which a relationship dependent on thesetting information of the previous, following, or upper unit of thecurrent unit is added to, or substituted for, the independent settings.

Preferred embodiments of the present invention will be described belowin more detail with reference to the accompanying drawings.

FIG. 1 is a conceptual view of an image encoding and decoding systemaccording to an embodiment of the present invention.

Referring to FIG. 1, an image encoding apparatus 105 and an imagedecoding apparatus 100 may be a user terminal such as a personalcomputer (PC), a notebook computer, a personal digital assistant (PDA),a portable multimedia player (PMP), a PlayStation Portable (PSP), awireless communication terminal, a smartphone, and a TV or a serverterminal such as an application server and a service server and mayinclude a variety of apparatuses having a communication device, such asa communication modem, for communicating with various devices orwired/wireless communication networks, a memory 120 or 125 for storingvarious programs and data for performing inter- or intra-prediction toencode or decode an image, a processor 110 or 115 for executing programsto perform computation and control, and so on. Also, an image encodedinto a bitstream by the image encoding apparatus 105 is transmitted tothe image decoding apparatus 100 in real time or in non-real timethrough a wired/wireless communication network such as the Internet, alocal area network (LAN), a wireless LAN, a WiBro network, or a mobilecommunication network or through a variety of communication interfacessuch as a cable, a universal serial bus (USB), or the like. Thebitstream may be decoded by the image decoding apparatus 100 to restorethe image, and the image may be reproduced. Also, the image encoded intothe bitstream by the image encoding apparatus 105 may be transferredfrom the image encoding apparatus 105 to the image decoding apparatus100 through a computer-readable recording medium.

FIG. 2 is a block diagram of an image encoding apparatus according to anembodiment of the present invention.

As shown in FIG. 2, an image encoding apparatus 20 according to theembodiment may include a prediction unit 200, a subtractor unit 205, atransformation unit 210, a quantization unit 215, an inversequantization unit 220, an inverse transformation unit 225, an adder unit230, a filter unit 235, a decoded picture buffer 240, and an entropyencoding unit 245.

The prediction unit 200 may include an intra-prediction unit configuredto perform intra-prediction and an inter-prediction unit configured toperform inter-prediction. The intra-prediction may generate a predictionblock by performing spatial prediction using a pixel of a block adjacentto a current block, and the inter-prediction may generate a predictionblock by finding a region that best matches a current block on the basisof a reference image and performing motion compensation. Whether to usethe intra-prediction or the inter-prediction may be determined for acorresponding unit (an encoding unit or a prediction unit), detailedinformation (e.g., an intra-prediction mode, a motion vector, areference image, etc.) on each prediction method may be determined. Inthis case, a processing unit for performing prediction, a predictionmethod, and a processing unit for determining details may be determinedaccording to encoding/decoding settings. For example, a predictionmethod, a prediction mode, and the like may be determined in predictionunits, and prediction may be performed in transformation units.

The subtractor unit 205 may subtract the prediction block from thecurrent block to generate a residual block. That is, the subtractor unit205 may calculate a difference between a pixel value of each pixel ofthe current block to be encoded and a predicted pixel value of acorresponding pixel of the prediction block generated through theprediction unit to generate a residual block, which is a block-typeresidual signal.

The transformation unit 210 transforms the residual block into afrequency domain to transform each pixel value of the residual blockinto a frequency coefficient. Here, the transformation unit 210 maytransform a residual signal into the frequency domain by using varioustransformation techniques for transforming a picture signal on thespatial axis into the frequency axis, such as Hadamard transform,discrete cosine transform (DCT)-based transform, discrete sine transform(DST)-based transform, and Karhuhen-Loeve transform (KTL)-basedtransform. The residual signal transformed into the frequency domain isa frequency coefficient. The transformation may be made by aone-dimensional transformation matrix. Each transformation matrix may beadaptively used in horizontal and vertical units. For example, for theintra-prediction, when the prediction mode is horizontal, the DCT-basedtransformation matrix may be used in a vertical direction, and theDST-based transformation matrix may be used in a horizontal direction.When the prediction mode is vertical, the DCT-based transformationmatrix may be used in a horizontal direction, and the DST-basedtransformation matrix may be used in a vertical direction.

The quantization unit 215 quantizes the residual block having thefrequency coefficient obtained through the transformation into thefrequency domain by the transformation unit 210. Here, the quantizationunit 215 may quantize the transformed residual block by using a deadzone uniform threshold quantization, a quantization weighted matrix, orother enhanced quantization methods. One or more quantization methodsmay be provided as candidates and may be determined by an encoding mode,prediction mode information, and the like.

The entropy encoding unit 245 scans a generated quantization frequencycoefficient string according to various scan schemes to generate aquantization coefficient string, encodes the generated quantizationcoefficient string using an entropy encoding technique or the like, andoutputs the encoded string. One of various patterns such as a zigzagpattern, a diagonal pattern, and a raster pattern may be set as apattern for the scanning.

The inverse quantization unit 220 inversely quantizes the residual blockquantized by the quantization unit 215. That is, the inversequantization unit 220 inversely quantizes the quantization frequencycoefficient string to generate a residual block having a frequencycoefficient.

The inverse transformation unit 225 inversely transforms the residualblock that is inversely quantized by the inverse quantization unit 220.That is, the inverse transformation unit 225 inversely transforms thefrequency coefficients of the inversely quantized residual block togenerate a residual block having a pixel value, i.e., a restoredresidual block. Here, the inverse transformation unit 225 may performinverse transformation by inversely using the transformation scheme usedby the transformation unit 210.

The adder unit 230 adds the residual block restored by the inversetransformation unit 225 to the prediction block predicted by theprediction unit 200 to restore the current block. The restored currentblock may be stored in the decoded picture buffer 240 as a referencepicture (or a reference block) and may be used as the reference picturewhen a block after the current block or another block or picturesubsequent to the current block is encoded.

The filter unit 235 may perform a post-processing filtering process ofone or more of a deblocking filter, a sample adaptive offset (SAO), anadaptive loop filter (ALF), and the like. The deblocking filter mayremove block distortion generated at a boundary between blocks from therestored picture. The ALF may perform filtering on the basis of a valueobtained by comparing an original image to an image restored after theblock is filtered through the deblocking filter. The SAO may restore anoffset difference between the original image and the residual block towhich the deblocking filter is applied, in units of pixels and may beapplied in the formed of a band offset, an edge offset, or the like.Such a post-processing filter may be applied to the restored picture orblock.

The decoded picture buffer 240 may store the block or picture restoredthrough the filter unit 235. The restored block or picture stored in thedecoded picture buffer 240 may be provided to the prediction unit 200,which is configured to perform intra-prediction or inter-prediction.

Although not shown, a segmentation unit may be additionally included,and the restored block or picture may be segmented into encoding unitshaving various sizes by the segmentation unit. In this case, such anencoding unit may be composed of a plurality of encoding blocks (e.g.,one luminance encoding block, two chrominance encoding blocks, etc.)according to a color format. For convenience of description, one colorcomponent unit is assumed. The encoding block may have a variable sizesuch as M×M (e.g., M is 4, 8, 16, 32, 64, 128, or the like).Alternatively, depending on segmentation schemes (e.g., tree-basedsegmentation, quadtree segmentation, binary tree segmentation, etc.),the encoding block may have a variable size of M×N (e.g., M and N are 4,8, 16, 32, 64, 128, or the like). In this case, the encoding block maybe a unit that is a basis for intra-prediction, inter-prediction,transformation, quantization, entropy encoding, and the like.

The present invention assumes that a plurality of sub-blocks having thesame size and shape are acquired depending on the segmentation schemes.However, the present invention may also be applied to asymmetricsub-blocks (e.g., for a binary tree, 4M×4N is segmented into 3M×4N andM×4N or 4M×3N and 4M×N). In this case, the asymmetric sub-blocks may besupported by information used to determine whether the segmentationscheme for acquiring the symmetric sub-blocks will provide additionalsupport according to the encoding/decoding settings.

The segmentation of the encoding block (with a size of M×N) may have arecursive tree-based structure. In this case, whether to performsegmentation may be represented through a segmentation flag (e.g., aquadtree segmentation flag, a binary segmentation flag, etc.). Forexample, when the segmentation flag of an encoding block having asegmentation depth of k indicates 0, the encoding of the encoding blockmay be performed on the encoding block having a segmentation depth of k.When the segmentation flag of the encoding block having a segmentationdepth of k is 1, the encoding of the encoding block may be performed onfour sub-encoding blocks (for quadtree segmentation) or two sub-encodingblocks (for binary tree segmentation), each of which has a segmentationdepth of k+1, depending on the segmentation schemes. In this case, thesize of the block may be (M>>1)×(N>>1) in the case of the four encodingblocks and may be (M>>1)×N or M×(N>>1) in the case of the two encodingblocks. Each of the sub-encoding blocks may be reset as an encodingblock (k+1) and may be segmented into sub-encoding blocks (k+2) throughthe above process. In this case, one segmentation flag (e.g., asegmentation presence flag) may be supported in the case of the quadtreesegmentation, and at least one (up to two) flag (e.g., a segmentationdirection flag <horizontal or vertical; which may be omitted in somecases depending on a preceding upper or previous segmentation result> inaddition to the segmentation presence flag) may be supported in the caseof the binary tree segmentation.

The block segmentation may be performed, starting from the maximumencoding block up to the minimum encoding block. Alternatively, theblock segmentation may be performed, starting from the minimumsegmentation depth up to the maximum segmentation depth. That is, thesegmentation may be recursively performed until the block size reachesthe minimum encoding block size or until the segmentation depth reachesthe maximum segmentation depth. In this case, the maximum encoding blocksize, the minimum encoding block size, and the maximum segmentationdepth may be adaptively set depending on the encoding/decoding settings(e.g., image <slice, tile>, type <I/P/B>, encoding mode <intra-inter>,chrominance component <Y/Cb/Cr>, etc.). For example, when the maximumencoding block has a size of 128×128, the quadtree segmentation may beperformed in the range of 8×8 to 128×128, and the binary treesegmentation may be performed in the range of 4×4 to 32×32 and in thecase where the maximum segmentation depth is 3. Alternatively, thequadtree segmentation may be performed in the range of 8×8 to 128×128,and the binary tree segmentation may be performed in the range of 4×4 to128×128 and in the case where the maximum segmentation depth is 3. Theformer case may indicate settings for image type I (e.g., a slice), andthe latter case may indicate settings for image type P or B. Asdescribed in the above example, the segmentation settings such as themaximum encoding block size, the minimum encoding block size, and themaximum segmentation depth may be supported individually or in commondepending on the segmentation schemes.

When a plurality of segmentation schemes are supported, the segmentationmay be performed in a block support range of each of the segmentationschemes. When the block support ranges of the segmentation schemesoverlap each other, the segmentation schemes may have their ownpriorities. For example, the quadtree segmentation may precede thebinary tree segmentation. Also, when a plurality of segmentation schemesare supported, whether to perform the following segmentation may bedetermined depending on a result of the preceding segmentation. Forexample, when the result of the preceding segmentation indicates toperform segmentation, sub-encoding blocks obtained through the precedingsegmentation may be reset to be encoding blocks and then segmented,instead of the following segmentation being performed.

Alternatively, when the result of the preceding segmentation indicatesnot to perform segmentation, the segmentation may be performed accordingto the result of the following segmentation. In this case, when theresult of the following segmentation indicates to perform segmentation,sub-encoding blocks obtained through the following segmentation may bereset to encoding blocks and then segmented. When the result of thefollowing segmentation indicates not to perform segmentation, thesegmentation is no longer performed. In this case, even though theresult of the following segmentation indicates to perform segmentationand the sub-encoding blocks obtained through the following segmentationare reset to encoding blocks, the preceding segmentation may not beperformed and only the following segmentation may be supported when theplurality of segmentation schemes are supported. That is, when theplurality of segmentation schemes are supported and the result of thepreceding segmentation indicates not to perform segmentation, thesegmentation is no longer performed.

For example, when an encoding block having a size of M×N is capable ofquadtree segmentation and binary tree segmentation, a quadtreesegmentation flag may be checked first. When the segmentation flag is 1,the encoding block may be segmented into four sub-encoding blocks havinga size of (M>>1)×(N>>1). Then, each of the sub-encoding blocks may bereset to an encoding block, and segmentation (quadtree segmentation orbinary tree segmentation) may be performed on the encoding block. Whenthe segmentation flag is 0, a binary tree segmentation flag may bechecked. When the binary tree segmentation flag is 1, the encoding blockmay be segmented into two sub-encoding blocks having a size of (M>>1)×Nor M×(N>>1). Then, each of the sub-encoding blocks may be reset to anencoding block, and segmentation (binary tree segmentation) may beperformed on the encoding block. When the segmentation flag is 0, thesegmentation process is terminated, and encoding proceeds.

Although a case where a plurality of segmentation schemes are performedhas been described as an example, the present invention is not limitedthereto, and a combination of supporting various segmentation schemesmay be possible. For example, a segmentation scheme such as a quadtree,a binary tree, and a quadtree+a binary tree may be used. In this case,the quadtree scheme may be set as a default segmentation scheme, and thebinary tree scheme may be set as an additional segmentation scheme.Information about whether to support the additional segmentation schememay be explicitly included in units of a sequence, a picture, a slice, atile, or the like.

In the above example, information associated with segmentation, such assize information of encoding blocks, the range of supporting encodingblocks, and the maximum segmentation depth may be included in units of asequence, a picture, a slice, a tile, or the like or may be implicitlydetermined. In summary, the range of allowable blocks may be determinedby the maximum encoding block size, the range of supported blocks, themaximum segmentation depth, and the like.

The encoding block acquired by the segmentation being performed throughthe process may be set to have the maximum size for the intra-predictionor the inter-prediction. That is, the encoding block obtained after theblock segmentation may have an initial size for segmentation of theprediction block for intra-prediction or inter-prediction. For example,when the encoding block has a size of 2M×2N, the prediction block mayhave a size smaller than or equal to that of the encoding block, i.e., asize of 2M×2N or M×N. Alternatively, the prediction block may have asize of 2M×2N, 2M×N. M×2N, or M×N. Alternatively, the prediction blockmay have the same size as the encoding block, i.e., a size of 2M×2N. Inthis case, the encoding block and the prediction block having the samesize may mean that the prediction block is not segmented and predictionis performed with a size acquired through segmentation of the encodingblock. That is, this means that segmentation information for theprediction block is not generated. The settings may be applied even to atransformation block, and transformation may be performed in units ofsegmented encoding blocks. That is, a square or rectangular blockacquired through the segmentation result may be a block used forintra-prediction and inter-prediction and also may be a block used fortransformation and quantization of a residual component.

FIG. 3 is a block diagram of an image decoding apparatus according to anembodiment of the present invention.

Referring to FIG. 3, an image decoding apparatus 30 may include anencoded picture buffer 300, an entropy decoding unit 305, a predictionunit 310, an inverse quantization unit 315, an inverse transformationunit 320, an adder-subtractor 325, a filter 330, and a decoded picturebuffer 335.

Also, the prediction unit 310 may include an intra-prediction module andan inter-prediction module.

First, when an image bitstream is received from the image encodingapparatus 20, the received bitstream may be stored in the encodedpicture buffer 300.

The entropy decoding unit 305 may decode the bitstream to generatequantized coefficients, motion vectors, and other syntaxes. Thegenerated data may be transferred to the prediction unit 310.

The prediction unit 310 may generate a prediction block on the basis ofthe data transferred from the entropy decoding unit 305. In this case, areference picture list may be configured using a default configurationtechnique on the basis of a reference image stored in the decodedpicture buffer 335.

The inverse quantization unit 315 may inversely quantize quantizedtransformation coefficients that are provided in the bitstream anddecoded by the entropy decoding unit 305.

The inverse transformation unit 320 may apply inverse DCT, inverseinteger transformation, or inverse-transformation techniques withsimilar concepts to the transformation coefficients to generate aresidual block.

In this case, the inverse quantization unit 315 and the inversetransformation unit 320 may be implemented in various methods toinversely perform the processes performed by the transformation unit 210and the quantization unit 215 of the image encoding apparatus 20, whichhave been described above, respectively. For example, the inversequantization unit 315 and the inverse transformation unit 320 may usethe same process and inverse transformation shared with thetransformation unit 210 and the quantization unit 215 and may inverselyperform the transformation and quantization process using informationregarding the transformation and quantization process (e.g., atransformation size, a transformation form, a quantization type, etc.)which is received from the image encoding apparatus 20.

A restored image block may be generated by adding the residual block onwhich the inverse quantization and inverse transformation process isperformed to the prediction block obtained by the prediction unit 310.The addition may be achieved by the adder-subtractor 325.

A deblocking filter may be applied to the restored image block as thefilter 330 in order to remove a blocking phenomenon if necessary, andother loop filters may be additionally used before and after thedecoding process in order to enhance video quality.

The image block on which the restoration and filtering are performed maybe stored in the decoded picture buffer 335.

FIG. 4 is an example diagram illustrating an intra-prediction mode inHigh Efficiency Video Coding (HEVC).

Referring to FIG. 4, several orientations forming an intra-predictionmode may be checked in the HEVC.

In detail, the HEVC may support a total of 35 intra-prediction modes,including 33 directional modes (shown in directions #2 to #34) and twonon-directional modes (Intra_planar, Intra_DC). In this case, differentnumbers of intra-prediction modes may be set depending on block sizes.For example, a block having a size of 64×64 may support 67intra-prediction modes, a block having a size of 32×32 may support 35intra-prediction modes, and a block having a size of 16×16 may support19 intra-prediction modes.

FIG. 5 is an example diagram illustrating an intra-prediction methodaccording to a vertical mode.

Referring to FIG. 5, all or some of pixels X, A, B, C, D, . . . , L, M,N, O, and P adjacent to a current block among pixels belonging to aneighboring block adjacent to the current block may be used as referencepixels for intra-prediction. In this case, the neighboring blockadjacent to the current block may include blocks on the lower left side,the left side, the upper left side, the upper side, and the upper rightside of the current block.

Here, the reference pixels according to the vertical mode may beadjacent pixels A, B, C, and D belonging to a block on the upper side ofthe current block. Accordingly, a prediction block for the current blockmay be generated by interpolating, extrapolating, or averaging (e.g.,copying reference pixels in a vertical direction) the adjacent pixelsbelonging to the block on the upper side of the current block.

Even though the vertical mode has been described as an example in FIG.5, it will be easily understood by those skilled in the art that all ofthe directional modes and the non-direction modes shown in FIG. 4 can beapplied in the same manner.

Meanwhile, the reference pixels used for the intra-prediction are pixelsbelonging to a neighboring block and may contain a quantization errorgenerated during an encoding-decoding process of the neighboring block.Accordingly, reference pixel filtering may be needed to remove thequantization error.

However, the reference pixel filtering may not always produce goodresults. For example, when a pixel value greatly different from anoriginal pixel value is obtained as a result of the filtering inaddition to the quantization error being reduced through the filtering,the accuracy of the intra-prediction may be reduced due to inaccuratereference pixels. However, when the filtering is not performed, thequantization error cannot be reduced, which may lead to a reduction inthe accuracy of the intra-prediction.

To this end, there is a need for a method for adaptive filtering. Forexample, through analysis of statistical characteristics, the filteringmay be implicitly applied according to the size of the current block inthe case of Advanced Video Coding (AVC), and the filtering may beimplicitly applied according to the size of the current block and theprediction mode of the current block in the case of the HEVC.

The reference pixels may be used to generate the prediction block forthe current block but belong to the neighboring block other than thecurrent block. In the case of a conventional method, the filtering isapplied with consideration of only the state (the block size orprediction mode) of the current block, and thus image characteristicscannot be properly reflected.

Various methods for effective reference pixel filtering may besupported.

As an example, conventionally, a single filter (e.g., a 3-tap filter[1,2,1]/4) applied for reference pixel filtering (in the implicit casein this example) is supported, but a plurality of filters (e.g., 3-tapfilter [1,2,1]/4 a 5-tap filter [2,3,6,3,2]/16, etc.) may be supported.In this case, the filtering process means that filtering is applied to atarget pixel to be filtered and at least one pixel adjacent to thetarget pixel (pixels at upper, lower, right, and left sides of thetarget pixel). Also, the filtering process means that filtering isapplied using pixels that are not adjacent to the target pixel to befiltered (e.g., bi-directional filtering using pixels located at thecorners of the block).

For example, filtering is not applied to blocks having a size of lessthan 8×8, a filter A (3-tap filter in this example) is applied to blockshaving a size ranging from 8×8 to 32×32, and a filter B (5-tap filter inthis example) is applied to blocks having a size of more than 32×32. Inthe above example, the filtering-related classification has beenperformed according to the block size, but the classification may beperformed with consideration of the block type, the prediction mode, andthe like.

As an example, conventionally, whether to apply the reference pixelfiltering is implicitly processed, but filtering-related information maybe explicitly generated.

For example, information regarding whether a predetermined filter (e.g.,a 3-tap filter [1,2,1]/4) is applied to the reference pixels may begenerated. The filtering is applied to the reference pixels when theflag is 1 and is not applied to the reference pixels when the flag is 0.

Alternatively, in addition to the information regarding whether to applythe filtering, one filter candidate group may be selected from among aplurality of filter candidate groups. That is, filter selectioninformation may be explicitly generated in addition to a filteringapplication flag. For example, a plurality of filters (e.g., a 3-tapfilter [1,2,1]/4 and a 5-tap filter [2,3,6,3,2]/16) may be provided as areference pixel filter candidate group. When a reference pixel filteringapplication flag is 1, reference pixel filtering corresponding to thefilter selection information (e.g., a 3-tap filter when the filterselection information indicates 0 and a 5-tap filter when the filterselection information indicates 1) may be performed. Alternatively, whenthe reference pixel filtering application flag is 0, the filtering isnot applied to the reference pixels.

Also, the reference pixel filtering process may be performed while theinformation of the current block is associated with the filteringsettings.

For example, the filtering may be implicitly processed in some of theencoding/decoding settings and may be explicitly processed in other ofthe encoding/decoding settings. In detail, when the filtering isimplicitly processed and performed in some of the encoding/decodingsettings, the filter selection information may be implicitly processed.When the filtering is explicitly processed and performed in other of theencoding/decoding settings, the filter selection information may also beexplicitly processed. Alternatively, when the filtering is implicitlyprocessed but performed in some of the encoding/decoding settings, thefiltering may be processed according to the filter selection informationthat is explicitly generated. When the filtering is explicitly processedbut performed in other of the encoding/decoding settings, the filteringmay be processed according to the filter selection information that isimplicitly processed. In this case, the encoding/decoding settings maybe determined by at least one of or a combination of the size, shape,prediction mode, and the like of the current block.

For example, the filtering may be explicitly performed and the pluralityof filter candidate groups may be supported in the case of blocks havinga size of less than 8×8. The filtering may be explicitly performed andone predetermined filter may be supported in the case of blocks having asize ranging from 8×8 to 32×32. The filtering may be implicitlysupported in the case of blocks having a size of more than 32×32. In theabove example, the filtering-related classification has been performedaccording to the block size, but the classification may be performedwith consideration of the shape, the prediction mode, and the like ofthe block.

In the above example, various combinations for the reference pixelfiltering in which the filtering is adaptively determined according tothe characteristics of the current block have been described. However,the present invention is not limited thereto, and various modificationsand combinations may be possible. In the following example, an adaptivefiltering method for reference pixels with consideration of thecharacteristics of a neighboring block and a correlation between thecurrent block and the neighboring block as well as the characteristicsof the current block will be proposed. The following description willfocus on the case of implicitly processing, but may be applied to theexplicit or other settings as is or after modification.

Also, in the following example, the adaptive filtering will be describedfocusing on the block size in the correlation between the current blockand the neighboring block, but the example may be understood as the casewhere the reference pixel filtering used for the current block isapplied with consideration of the state (e.g., block segmentation, blockboundaries, etc.) of the neighboring block used to predict the currentblock.

FIG. 6 is an example diagram illustrating a method of adaptivelyfiltering a reference pixel on the basis of a correlation between acurrent block and a neighboring block in intra-prediction according toan embodiment of the present invention.

Referring to FIG. 6, the neighboring block adjacent to the current block(Current) may include a block a located on the left side, a block blocated on the upper left side, a block c located on the upper side, andblocks d and e located on the upper right side (hereinafter, each blockmay be referred to as its reference numeral). In this case, the size ofthe neighboring blocks adjacent to the current block (Current)(specifically the width or length of the current block, which isreferred to as a size because this example is for a square block) may beidentical to or different from the current block. For example, the blocka may be larger than the current block (Current), the block b may besmaller than the current block, the block c may be equal to the currentblock, and the blocks d and e may be smaller than the current block.

According to a first embodiment of the present invention, adaptivefiltering may be performed on a reference pixel on the basis of therelationship in size between the current block and the neighboringblocks. Different filtering methods may be applied to reference pixelsin at least two of the case where a neighboring block is greater thanthe current block, the case where a neighboring block is equal to thecurrent block, and the case where a neighboring block is smaller thanthe current block through comparison in size between the current blockand the neighboring block.

For example, a first filtering method may be applied to reference pixelsbelonging to the neighboring blocks b, d, and e smaller than the currentblock (Current), a second filtering method may be applied to referencepixels belonging to the neighboring block c equal to the current block(Current), and a third filtering method may be applied to referencepixels belonging to the neighboring block a larger than the currentblock (Current).

Also, the third filtering method may be applied to the reference pixelsbelonging to all the neighboring blocks when all the neighboring blocksare larger than the current block, the second filtering method may beapplied to the reference pixels belonging to all the neighboring blockswhen all the neighboring blocks are equal to the current block, and thefirst filtering method may be applied to the reference pixels belongingto all the neighboring blocks when all the neighboring blocks aresmaller than the current block.

The weakest filter (e.g., a 3-tap filter [1,2,1]/4) may be applied forthe first filtering method that is applied when a neighboring block issmaller than the current block, the strongest filter (e.g., abi-directional filter using pixels at the corners) may be applied forthe third filtering method that is applied when a neighboring block islarger than the current block, and a filter having a middle level offiltering strength (e.g., a 5-tap filter [2, 3, 6, 3, 2]/16) may beapplied for the second filtering method that is applied when aneighboring block is equal to the current block.

Here, when the second filtering method is described as a predeterminedreference filtering method, the first filtering method may be describedas a filtering method weaker than the second filtering method, and thethird filtering method may be described as a filtering method strongerthan the second filtering method. In detail, strong filtering may befiltering corresponding to when the number of pixels to be referred toin the filtering process is large or when the interval between pixels islong, and weak filtering may be filtering with properties that arerelatively opposite to the above definition. However, the presentinvention is not limited thereto, and various definitions may bepossible. Hereinafter, the first to third filtering methods have thesame meanings as described above.

According to a second embodiment of the present invention, adaptivefiltering may be performed on a reference pixel on the basis of therelationship in size between the current block and the neighboringblocks and the size of the current block. As described above, theadaptive filtering may be an example filtering that is performed withconsideration of the characteristics of the current block, such as thesize, shape, prediction mode, and the like of the current block, and thecorrelation between the current block and the neighboring block (in thisexample, the size of the current block is additionally considered).

Referring to FIG. 6 again, for example, the current block (Current) issmaller than a predetermined size M×N. and the first filtering method(the weakest filter) may be applied to the reference pixels belonging tothe neighboring blocks b, d, and e smaller than the current block(Current). The current block (Current) is smaller than the predeterminedsize, and the second filtering method may be applied to the referencepixels belonging to the neighboring blocks a and c greater than or equalto the current block (Current). Also, when the current block (Current)is larger than the predetermined size, the third filtering method may beapplied regardless of the sizes of the neighboring blocks. That is,unlike the first embodiment, according to the second embodiment, thethird filtering method (the strongest filter) may be collectivelyapplied without considering the sizes of the neighboring blocks when thecurrent block is larger than the predetermined size. In this case, thepredetermined size may be one of 64×64, 32×32, 16×16, and 8×8.

According to a third embodiment of the present invention, the predictionmode of the current block may be considered as an assumption forperforming adaptive filtering on a reference pixel on the basis of therelationship in size between the current block and the neighboringblocks according to the first embodiment. This example may be an examplefiltering that is performed with consideration of the characteristics ofthe current block and the correlation between the current block and theneighboring block (in this example, the prediction mode of the currentblock is additionally considered).

That is, the adaptive filtering according to the first embodiment may beperformed only when the intra-prediction mode of the current blocksatisfies a predetermined condition and may be omitted when theintra-prediction mode does not satisfy the predetermined condition.Here, the minimum distance (minDistVerHor) between the intra-predictionmode of the current block and the vertical mode or the horizontal modemay be considered as the predetermined condition, and the minimumdistance may be defined as in Equation 1.

minDistVerHor=min(abs(predmode−26),abs(predmode−10))  [Equation 1]

Referring to Equation 1, predmode may be a number indicating theintra-prediction mode of the current block (referring to anintra-prediction mode number shown in FIG. 4), abs may be an operationfor obtaining an absolute value, min may be an operation for obtaining aminimum value of the two values, 26 may be a mode number of the verticalmode, and 10 may be a mode number of the horizontal mode. That is, theminimum distance may be a value that minimizes a difference between theintra-prediction mode number of the current block and the horizontalmode number or the vertical mode number.

Therefore, according to the third embodiment, the adaptive filteringaccording to the first embodiment may be performed only when the minimumdistance between the intra-prediction mode of the current block and thevertical mode or the horizontal mode is greater than or equal to apredetermined threshold value. Also, when the minimum distance betweenthe intra-prediction mode of the current block and the vertical mode orthe horizontal mode is smaller than the predetermined threshold value,the filtering of the reference pixels belonging to the neighboringblocks may be omitted. The threshold value may have one common value ormay have a value determined according to the size, shape, etc. of theblock.

The reference pixel filtering through comparison in size between thecurrent block and the neighboring block has been described withreference to the above example. Although filtering classificationthrough a simple comparison of block sizes has been described throughseveral embodiments, this can be understood as an example filtering thatconsiders characteristics of neighboring blocks.

Generally, a block boundary region contains many quantization errors,which cause inter-block discontinuity. This is also why some in-loopfilters (e.g., a deblocking filter) exist. However, since the filteringprocess is also post-processing filtering, an image encoding/decodingprocess (a predictive encoding process in this example) may be beforefiltering is performed on a boundary between blocks.

Referring to FIG. 6, the neighboring block b may be a block located onthe left side of the current block and also may be a block located onthe lower left side. That is, since the block located on the left sideof the current block and the block located on the lower left side of thecurrent block form one block, there may be no boundary between the leftblock and the lower left block.

The neighboring blocks d and e may be blocks located on the upper leftside of the current block, but the blocks located on the upper left sideof the current block may include a plurality of blocks, and thus theremay be boundaries between the blocks.

That is, when a comparison is made focusing on the size and shape of thecurrent block, a large block may be likely to have no blockdeterioration caused by a block boundary in the block, and a small blockmay be likely to have block deterioration caused by a block boundary inthe block. For this purpose, various cases for block-based filtering(partially applied filtering) (performed on neighboring blocks) otherthan filtering applied collectively to the reference pixels have beendescribed through the above example. In the following example,pixel-based filtering for solving the above problem will be described.

FIG. 7 is an example diagram illustrating an adaptive filtering methoddepending on the location of the reference pixel in intra-predictionaccording to an embodiment of the present invention.

Referring to FIG. 7, it can be seen that, among neighboring blocksadjacent to a current block (Current), a block a located on the leftside of the current block is equal in size to the current block andblocks b and c located on the upper side of the current block is smallerthan the current block.

First, for the neighboring blocks b and c smaller than the currentblock, some pixels among the reference pixels belonging to the blocks band c smaller than the current block may exist such as b1 and b2. Inthis case, it can be seen that b1 and b2 have a length corresponding tothe number of filtering taps (e.g., a 3-tap filter is composed of threepixels, and in the drawing, it is shown that the 3-tap filter isapplied) and reference pixels to be filtered depending on the number offiltering taps may be located on a boundary between blocks. That is, thereference pixels b1 are located in one neighboring block, and thereference pixels b2 may be located across the neighboring blocks b andc.

Generally, considering that the discontinuity of pixels on a boundarybetween blocks is large, it may not be proper to filter the referencepixels b2 located on the boundary between the blocks in the same manneras that of the reference pixels b1 located in any one block.Accordingly, filter coefficients different from those of the referencepixels b1 may be applied to the reference pixels b2 located on theboundary between the blocks. For example, a 3-tap filter [1, 2, 1]/4 maybe applied to the reference pixels b1, and a 3-tap filter [1, 6, 1]/8may be applied to the reference pixels b2. That is, since the referencepixels b2 are located across the block b and the block c, the filtercoefficients may be changed in order to reduce pixel influence of anyone of the two blocks. Also, a 3-tap filter may be applied to thereference pixels b1 located inside the block, and a different number oftaps of the filter, i.e., a 5-tap filter may be applied to the referencepixels b2 located on the boundary between the blocks.

Next, for the neighboring block a equal in size to the current block,there may be an edge component in the neighboring block a. In this case,when filtering is collectively applied to all the reference pixels a1,a2, a3, a4, a5, and a6 belonging to the block having the edge component,the reference pixels may be inaccurately adjusted, thereby reducing theaccuracy of the intra-prediction. Accordingly, when an edge component ispresent between reference pixels belonging to neighboring blocks largerthan or equal in size to the current block, it is possible to omit tofilter the reference pixels or apply another filter to the referencepixels. In summary, depending on the process, the filtering may not beapplied, the filtering may continue to be applied, or other filteringmay be applied.

In this case, a criterion for determining whether to have an edge may bedetermined as follows.

Referring to FIG. 7, it is assumed that it is determined whether sixreference pixels of the neighboring block a have an edge. Thedetermination may be made by comparing a value obtained using threeconsecutive pixels to a reference value and by comparing a valueobtained using two consecutive pixels to a threshold value.

For example, an example in which the value obtained by using threeconsecutive pixels is compared to the threshold value is expressed bythe following Equation 2.

d3a=abs(a1−2×a2+a3)  [Equation 2]

Referring to Equation 2, a value d3a obtained by substituting pixelvalues of three consecutive pixels a1, a2, and a3 into Equation 2 andperforming an absolute value operation (abs) may be found. In this case,by comparing the obtained value d3a to the threshold value, whether tohave an edge may be determined.

d2=abs(a3−a4)  [Equation 3]

Referring to Equation 3, a value d2 obtained by substituting pixelvalues of two consecutive pixels a3 and a4 into the equation andperforming an absolute value operation (abs) may be found. In this case,by comparing the obtained value d2 to the threshold value, whether tohave an edge may be determined.

The method according to Equation 2 is not performed only once but in allthe cases of selecting three consecutive pixel values from among thereference pixels in the neighboring block. Thus, it is possible todetermine whether an edge is present between reference pixels in aspecific neighboring block.

Also, the method according to Equation 3 is not performed only once butin all the cases of selecting two consecutive pixel values from amongthe reference pixels in the neighboring block. Thus, it is possible todetermine whether an edge is present between reference pixels in aspecific neighboring block.

Also, in order to determine whether to have an edge, the method of usingtwo consecutive pixel values and the method of using three consecutivepixel values may be used in combination.

The above example is an example process of analyzing the characteristicsof a reference pixel (determined in units of at least one pixel in thisexample) to determine whether to apply reference pixel filtering, thetype of filtering, and the like. In detail, the above example is anexample of detecting an edge component in the reference pixel. However,the present invention is not limited to the above example, and thedetermination may be made in various ways.

FIG. 8 is a flowchart showing an intra-prediction method for adaptivelyfiltering reference pixels according to an embodiment of the presentinvention.

Referring to FIG. 8, the intra-prediction method for adaptivelyfiltering reference pixels may include configuring reference pixelsbelonging to a neighboring block adjacent to a current block (S100);adaptively filtering the configured reference pixels (S110); andgenerating a prediction block for the current block by performingintra-prediction using the filtered reference pixels (S120).

Here, the adaptive filtering (S110) may include performing adaptivefiltering according to a relative size of the neighboring block withrespect to the size of the current block.

Here, the adaptive filtering (S110) may include filtering the referencepixels by applying a filter weaker than a reference filter when theneighboring block is smaller than the current block.

Here, the adaptive filtering (S110) may include filtering the referencepixels by applying a filter stronger than the reference filter when theneighboring block is larger than the current block.

Here, the adaptive filtering (S110) may include filtering the referencepixels by applying the predetermined reference filter when theneighboring block is equal in size to the current block.

Here, the adaptive filtering (S110) may include performing adaptivefiltering according to a relative size of the neighboring block when thecurrent block is smaller than a predetermined size.

Here, the adaptive filtering (S110) may include filtering the referencepixels by applying a filter stronger than the reference filter withoutneeding to consider the relative size of the neighboring block when thecurrent block is larger than or equal in size to the predetermined size.

Here, the predetermined size may be one of 64×64, 32×32, 16×16, and 8×8.

Here, the adaptive filtering (S110) may be performed only when theminimum distance between the intra-prediction mode of the current blockand the vertical mode or the horizontal mode is greater than or equal toa predetermined threshold value.

Here, the adaptive filtering (S110) may include filtering the referencepixels by changing coefficients or the number of taps of the referencefilter when the neighboring block is smaller than the current block andthe configured reference pixels are located on a boundary between twoneighboring blocks.

Here, the adaptive filtering (S110) may include determining whether anedge is present between the reference pixels belonging to theneighboring block when the neighboring block is larger than or equal insize to the current block.

Here, the determining of whether an edge is present may includedetermining whether the edge is present depending on whether a firstvalue obtained by using three consecutive pixels or two consecutivepixels among the reference pixels is greater than the threshold value.

Here, the adaptive filtering (S110) may include filtering only referencepixels belonging to a neighboring block with no edge.

FIG. 9 is a block diagram showing an image decoding apparatus forperforming intra-prediction according to an embodiment of the presentinvention.

Referring to FIG. 9, an image decoding apparatus 200 may include atleast one processor 210 and a memory 220 configured to storeinstructions for instructing the at least one processor 210 to performat least one step.

Also, the image decoding apparatus 200 may further include acommunication module 230 configured to receive a bitstream from theimage encoding apparatus through a wired/wireless network.

Also, the image decoding apparatus 200 may further include a localstorage 240 configured to store a restored reference picture or block, adecoded frame, or the like.

Here, the at least one step may include configuring reference pixelsbelonging to a neighboring block adjacent to a current block, adaptivelyfiltering the configured reference pixels, and generating a predictionblock for the current block by performing intra-prediction using thefiltered reference pixels.

Here, the adaptively filtering may include performing adaptive filteringaccording to a relative size of the neighboring block with respect tothe size of the current block.

Here, the adaptive filtering may include filtering the reference pixelsby applying a filter weaker than a reference filter when the neighboringblock is smaller than the current block.

Here, the adaptive filtering may include filtering the reference pixelsby applying a filter stronger than the reference filter when theneighboring block is larger than the current block.

Here, the adaptive filtering may include filtering the reference pixelsby applying the predetermined reference filter when the neighboringblock is equal in size to the current block.

Here, the adaptive filtering may include performing adaptive filteringaccording to a relative size of the neighboring block when the currentblock is smaller than a predetermined size.

Here, the adaptive filtering may include filtering the reference pixelsby applying a filter stronger than the reference filter without needingto consider the relative size of the neighboring block when the currentblock is larger than or equal in size to the predetermined size.

Here, the predetermined size may be one of 64×64, 32×32, 16×16, and 8×8.

Here, the adaptive filtering may be performed only when the minimumdistance between the intra-prediction mode of the current block and thevertical mode or the horizontal mode is greater than or equal to apredetermined threshold value.

Here, the image decoding apparatus 200 may be, for example, a desktopcomputer, a laptop computer, a notebook, a smartphone, a tablet PC, amobile phone, a smart watch, smart glasses, an e-book reader, a portablemultimedia player (PMP), a portable game machine, a navigation device, adigital camera, a digital multimedia broadcasting (DMB) player, adigital audio recorder, a digital audio player, a digital videorecorder, a digital video player, a personal digital assistant (PDA), orthe like having a communication capability.

The methods according to the present invention may be implemented in theform of program instructions that are executable through variouscomputer means and may be recorded on a computer-readable medium. Thecomputer-readable medium may also include, alone or in combination withthe program instructions, data files, data structures, and the like. Theprogram instructions recorded on the computer-readable medium may bedesigned and configured specially for the present invention or may beknown and available to those skilled in the field of computer software.

Examples of computer-readable media may include hardware devices thatare specially configured to store and perform program instructions, suchas read-only memory (ROM), random access memory (RAM), flash memory, andthe like. Examples of program instructions may include machine code,such as produced by a compiler, and higher level code that may beexecuted by a computer using an interpreter. The described hardwaredevices may be configured to act as one or more software modules inorder to perform the operations of the present invention, or vice versa.

Furthermore, the above-mentioned method or apparatus may be implementedby all or some of the elements or functions being combined or separated.

While the present invention has been particularly shown and describedwith reference to exemplary embodiments thereof, it will be understoodby those skilled in the art that various changes in form and details maybe made therein without departing from the spirit and scope of theinvention as defined in the following claims.

1. An intra-prediction method for adaptively filtering a referencepixel, the intra-prediction method comprising: configuring referencepixels belonging to a neighboring block adjacent to a current block;adaptively filtering the configured reference pixels; and generating aprediction block for the current block by performing intra-predictionusing the filtered reference pixels, wherein the adaptive filteringcomprises performing adaptive filtering according to a relative size ofthe neighboring block with respect to the size of the current block. 2.The intra-prediction method of claim 1, wherein the adaptive filteringcomprises applying a filter weaker than a reference filter to filter thereference pixels when the neighboring block is smaller than the currentblock.
 3. The intra-prediction method of claim 1, wherein the adaptivefiltering comprises applying a filter stronger than a reference filterto filter the reference pixels when the neighboring block is larger thanthe current block.
 4. The intra-prediction method of claim 1, whereinthe adaptive filtering comprises applying a predetermined referencefilter to filter the reference pixels when the neighboring block isequal in size to the current block.
 5. The intra-prediction method ofclaim 1, wherein the adaptive filtering comprises performing theadaptively filtering according to the relative size of the neighboringblock when the current block is smaller than a predetermined size. 6.The intra-prediction method of claim 1, wherein the adaptive filteringcomprises applying a filter stronger than a reference filter to filterthe reference pixels without needing to consider the relative size ofthe neighboring block when the current block is larger than or equal insize to a predetermined size.
 7. The intra-prediction method of claim 6,wherein the predetermined size is one of 64×64, 32×32, 16×16, and 8×8.8. The intra-prediction method of claim 1, wherein the adaptivefiltering is performed only when the minimum distance between anintra-prediction mode of the current block and a vertical mode or ahorizontal mode is greater than or equal to a predetermined thresholdvalue.
 9. The intra-prediction method of claim 1, wherein the adaptivefiltering comprises changing coefficients or the number of taps of areference filter and then filtering the reference pixels when theneighboring block is smaller than the current block and the configuredreference pixels are located on a boundary between two neighboringblocks.
 10. The intra-prediction method of claim 1, wherein the adaptivefiltering comprises determining whether an edge is present between thereference pixels belonging to the neighboring block when the neighboringblock is larger than or equal in size to the current block.
 11. Theintra-prediction method of claim 10, wherein the determining of whetheran edge is present comprises determining whether the edge is presentdepending on whether a first value obtained by using three consecutivepixels or two consecutive pixels among the reference pixels is greaterthan a threshold value.
 12. The intra-prediction method of claim 10,wherein the adaptive filtering comprises filtering only reference pixelsbelonging to a neighboring block with no edge.
 13. An image decodingapparatus for performing intra-prediction, the image decoding apparatuscomprising: at least one processor; and a memory configured to storeinstructions for instructing the at least one processor to perform atleast one step, wherein, the at least one step comprises: configuringreference pixels belonging to a neighboring block adjacent to a currentblock; adaptively filtering the configured reference pixels; andgenerating a prediction block for the current block by performingintra-prediction using the filtered reference pixels, wherein theadaptive filtering comprises performing adaptive filtering according toa relative size of the neighboring block with respect to the size of thecurrent block.
 14. The image decoding apparatus of claim 13, wherein theadaptive filtering comprises applying a filter weaker than a referencefilter to filter the reference pixels when the neighboring block issmaller than the current block.
 15. The image decoding apparatus ofclaim 13, wherein the adaptive filtering comprises applying a filterstronger than a reference filter to filter the reference pixels when theneighboring block is larger than the current block.
 16. The imagedecoding apparatus of claim 13, wherein the adaptive filtering comprisesapplying a predetermined reference filter to filer the reference pixelswhen the neighboring block is equal in size to the current block. 17.The image decoding apparatus of claim 13, wherein the adaptive filteringcomprises performing the adaptively filtering according to a relativesize of the neighboring block when the current block is smaller than apredetermined size.
 18. The image decoding apparatus of claim 13,wherein the adaptive filtering comprises applying a filter stronger thana reference filter to filter the reference pixels without needing toconsider the relative size of the neighboring block when the currentblock is larger than or equal in size to a predetermined size.
 19. Theimage decoding apparatus of claim 18, wherein the predetermined size isone of 64×64, 32×32, 16×16, and 8×8.
 20. The image decoding apparatus ofclaim 13, wherein the adaptive filtering is performed only when theminimum distance between an intra-prediction mode of the current blockand a vertical mode or a horizontal mode is greater than or equal to apredetermined threshold value.